﻿using CarEdge.Infrastructure.Attr;
using CarEdge.Infrastructure.Dto.Request.product;
using CarEdge.Infrastructure.Dto.Response;
using CarEdge.Infrastructure.Dto.Response.Product;
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CarEdge.Service.Interface.Product
{
    [Provider_]
    public interface I_Product_EFCore
    {
        /// <summary>
        /// 获取所有产品
        /// </summary>
        /// <returns></returns>
        Task<Api_Response_Dto> Get_ProductAll(int page=1,int limit=10,string key="");

        /// <summary>
        /// 上传图片
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        Task<Api_Response_Dto> UploadImage(IFormFileCollection file);

        /// <summary>
        /// 删除图片
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        Task<Api_Response_Dto> DeleteImage(IFormFileCollection file);

        /// <summary>
        /// 获取产品详情
        /// </summary>
        /// <param name="id">产品ID</param>
        /// <returns></returns>
        Task<Api_Response_Dto> Get_Product(string id);
     /// <summary>
     /// 批量/单个 删除产品
     /// </summary>
     /// <param name="product"></param>
     /// <returns></returns>
        Task<Api_Response_Dto> Delete_Product(IEnumerable<string?>? ids);
        /// <summary>
        /// 修改产品
        /// </summary>
        /// <param name="product">单个产品</param>
        /// <returns></returns>
        Task<Api_Response_Dto> Update_Product(Product_Response_Dto product);
        /// <summary>
        /// 添加产品
        /// </summary>
        /// <param name="product">产品</param>
        /// <returns></returns>
        Task<Api_Response_Dto> Add_Product(Product_Response_Dto product);

        /// <summary>
        /// 批量/单个 上/下架
        /// </summary>
        /// <param name="product">只需要传你需要上/下架的产品ID就行</param>
        /// <returns></returns>
        Task<Api_Response_Dto> Product_Islist(IEnumerable<string?>? ids);
        /// <summary>
        /// 添加产品类型
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        Task<Api_Response_Dto> Add_Product_Type(Product_Type_Response_Dto producttype);
        /// <summary>
        /// 获取所有产品类型
        /// </summary>
        /// <returns></returns>
        Task<Api_Response_Dto> Get_Product_Type();
        /// <summary>
        /// 批量/单个 删除产品类型
        /// </summary>
        /// <param name="producttype"></param>
        /// <returns></returns>
        Task<Api_Response_Dto> Delete_Product_Type(IEnumerable<string?>? ids);
        /// <summary>
        /// 修改产品类型
        /// </summary>
        /// <param name="producttype"></param>
        /// <returns></returns>
        Task<Api_Response_Dto> Update_Product_Type(Product_Type_Response_Dto producttype);
        /// <summary>
        /// 获取单个产品类型
        /// </summary>
        /// <param name="id">产品类型ID</param>
        /// <returns></returns>
        Task<Api_Response_Dto> Get_Product_Typeone(string id);
        /// <summary>
        /// 获取子级类型
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Api_Response_Dto> Get_children_type(string id);
        /// <summary>
        /// 获取子级并分页
        /// </summary>
        /// <param name="id"></param>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        Task<Api_Response_Dto> Get_children_Table(string id, int page = 1, int limit = 10, string key = "");

        /// <summary>
        /// 获取所有的套餐
        /// </summary>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        Task<Api_Response_Dto> Get_All_Package(int page = 1, int limit = 10, string key = "");
        /// <summary>
        /// 获取单个套餐详情
        /// </summary>
        /// <param name="id">套餐id</param>
        /// <returns></returns>
        Task<Api_Response_Dto> Get_Package_Detail(string id);

        /// <summary>
        /// 添加套餐
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<Api_Response_Dto> Add_Pacage(package_Request_Dto dto);

        /// <summary>
        /// 删除套餐
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Api_Response_Dto> isActive_Package(package_Request_Dto dto);

        /// <summary>
        /// 修改套餐
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<Api_Response_Dto> Update_Package(package_Request_Dto dto);
        /// <summary>
        /// 获取类型子级
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Api_Response_Dto> Get_tree_package(string id);
        /// <summary>
        /// 获取选中的产品信息
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<Api_Response_Dto> Getpro(IEnumerable<string?>? ids);

    }
}
